package lesson13;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * @author tongchen
 * @create 2023-02-12 21:53
 */
public class exer02 {
    public static void main(String[] args) throws IOException {
        //创建输入流对象
        FileInputStream fileInputStream = new FileInputStream("D:\\360安全浏览器下载\\test\\aa\\bb\\test.txt");
        //每次使用字符数组对的方式进行读取
        byte[] reads=new byte[1024];
        while(true){
            int read = fileInputStream.read(reads);
            if(read==-1){
                break;

            }
            for (int i = 0; i <read ; i++) {
                System.out.print((char) reads[i]);
            }

        }

    }
}
